interface A{
   void fun();
}
class B implements A{

    @Override
    public void fun() {
        System.out.println("hahah");
    }
}
public class Test {
    public static void main(String[] args) {
        A a=new A() {
            @Override
            public void fun() {
                System.out.println("张三");
            }
        };
        a.fun();
        new A(){
            @Override
            public void fun() {
                System.out.println("张三");
            }
        }.fun();
    }
}
